from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()

class User(db.Model):
    id = db.Column(db.Integer,primary_key=True,autoincrement=True)
    username = db.Column(db.String(8),unique=True,nullable=True)
    password = db.Column(db.String(120))


class Goods(db.Model):
    id = db.Column(db.Integer,primary_key=True,autoincrement=True)
    name = db.Column(db.String(150),unique=True)
    price = db.Column(db.Integer,default=1)
    pic = db.Column(db.String(150))